Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: keep build in pixi upgrade #2476

Merged
merged 6 commits into from
Nov 15, 2024

Conversation

ruben-arts
Copy link
Contributor

@ruben-arts ruben-arts commented Nov 13, 2024

Fixes #2469

This adds logic to make the pixi upgrade command a little more friendly.
It's an opinionated set of rules that we execute without any extra configuration options.

If you start with this manifest:

[dependencies]
python = "*"
python_abi = { version = "*", build = "5_cp313"}
pytest = { version = "*", build = "pyh*" }
pixi upgrade

Has this result:

[dependencies]
python = ">=3.13.0,<3.14"
python_abi = { version = ">=3.13,<3.14", build = "5_cp313" }
pytest = { version = ">=8.3.3,<8.4", build = "pyh*" }

Then running:

pixi upgrade python_abi

will give the following, because we assume you specifically want to upgrade it:

python = ">=3.13.0,<3.14"
python_abi = ">=3.13,<4"
pytest = { version = ">=8.3.3,<8.4", build = "pyh*" }

Running

pixi upgrade pytest

will give you the following, because you use a wildcard(*) we assume you want to keep it.

[dependencies]
python = ">=3.13.0,<3.14"
python_abi = ">=3.13,<4"
pytest = { version = ">=8.3.3,<8.4", build = "pyh*" }

Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small comments, apart from that it looks good to me

src/cli/upgrade.rs Outdated Show resolved Hide resolved
docs/reference/cli.md Outdated Show resolved Hide resolved
ruben-arts and others added 2 commits November 15, 2024 13:38
Co-authored-by: Hofer-Julian <[email protected]>
Co-authored-by: Hofer-Julian <[email protected]>
Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@Hofer-Julian Hofer-Julian enabled auto-merge (squash) November 15, 2024 12:47
@Hofer-Julian Hofer-Julian merged commit e96c6fe into prefix-dev:main Nov 15, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pixi upgrade removes custom build parameters in pyproject.toml
2 participants